<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  
</head>
<body>
  <div id="app">
    <!-- 输入框 文本框密码框文本域 -->
    <input type="text" v-model="msg">
    <br>
    {{ msg }}
    <hr>
    <!-- 复选框 -->
    爱好：
    <label for="lanqiu">篮球</label>
    <input type="checkbox" id="lanqiu" value="篮球" v-model="hobby">
    <label for="zuqiu">足球</label>
    <input type="checkbox" id="zuqiu" value="足球" v-model="hobby">
    <label for="paiqiu">排球</label>
    <input type="checkbox" id="paiqiu" value="排球" v-model="hobby">
    <br>
    {{hobby}}
    <hr>
    <!-- 复选框 第二种用法 单个复选框绑定布尔值 绑定的是复选框的checked属性-->
    是否同意xxxx
    <input type="checkbox" v-model="agree"> 
    {{
      agree
      ?
      '真的'
      :
      '假的'
    }}
    <hr>
    性别：
    <label for="male">男</label>
    <input type="radio" id="male" value="男" v-model="gender">
    <label for="female">女</label>
    <input type="radio" id="female" value="女" v-model="gender">
    {{gender}}
    <hr>
    <select v-model="city" id="">
      <option value="南京">南京</option>
      <option value="合肥">合肥</option>
      <option value="芜湖">芜湖</option>
      <option value="蚌埠">蚌埠</option>
    </select>
    {{ city }}
    <hr>
    <select v-model="city2" multiple>
      <option value="南京">南京</option>
      <option value="合肥">合肥</option>
      <option value="芜湖">芜湖</option>
      <option value="蚌埠">蚌埠</option>
    </select>
    {{ city2 }}
  </div>
  <script src="./vue.global.js"></script>
  <script>
    // 创建应用实例
    const { createApp } = Vue;
    const app = createApp({
      data(){
        return {
          msg:'初始值',
          hobby: ['足球'],
          agree: true,
          gender: '女',
          city: '合肥',
          city2: ['合肥']
        }
      }
    })
    app.mount("#app")
  </script>
</body>
</html>